import Vue from 'vue/dist/vue.min.js';
import VueRouter from 'vue-router/dist/vue-router.js';

import home from './components/tabbar/home.vue';
import contact from './components/tabbar/contact.vue';
import shopcar from './components/tabbar/shopcar.vue';
import search from './components/tabbar/search.vue';

import news from './components/content/news.vue';
import newsdetail from './components/content/newsdetail.vue';

Vue.use(VueRouter);

export default new VueRouter({
	routes: [
		{path: '/', redirect: '/home'},
		{path: '/home', component: home},
		{path: '/contact', component: contact},
		{path: '/shopcar', component: shopcar},
		{path: '/search', component: search},
		// home路由下的一些路由
		{path: '/home/news', component: news},
		{path: '/home/news/newsdetail/:id', component: newsdetail}
	],
	linkActiveClass: 'mui-active'
})
